//
// Created by zpf on 2023/5/16.
//

#ifndef UKUI_SNI_STATUS_NOTIFIER_ITEM_H
#define UKUI_SNI_STATUS_NOTIFIER_ITEM_H
#include <QObject>
#include <QMenu>
namespace UkuiSni {
class StatusNotifierItemPrivate;
class StatusNotifierItem: public QObject
{
    Q_OBJECT
public:
    explicit StatusNotifierItem(QObject *parent = nullptr);
    explicit StatusNotifierItem(const QString &service, QObject *parent = nullptr);
    ~StatusNotifierItem() override;
    Q_DISABLE_COPY(StatusNotifierItem)

    //service name + path
    void setServiceName(const QString &service);

    void contextMenu(int x, int y);
    void activate(int x, int y);
    void secondaryActivate(int x, int y);
    void scroll(int delta, const QString &direction);
    void provideXdgActivationToken(const QString &token);

    QString service();
    QIcon attentionIcon() const;
    QString attentionIconName() const;
    QString attentionMovieName() const;
    QString category() const;
    QIcon icon() const;
    QString iconName() const;
    QString iconThemePath() const;
    QString id() const;
    bool itemIsMenu() const;
    QIcon overlayIcon() const;
    QString overlayIconName() const;
    QString status() const;
    QString title() const;
    QVariant toolTipIcon() const;
    QString toolTipSubTitle() const;
    QString toolTipTitle() const;
    QString windowId() const;
    QString display() const;

Q_SIGNALS:
    void contextMenuReady(QMenu *menu);
    void activateResult(bool success);
    void dataUpdated();

private:
    StatusNotifierItemPrivate *d = nullptr;
};
}

#endif //UKUI_SNI_STATUS_NOTIFIER_ITEM_H
